package com.jcl.tree.po;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.util.HashSet;

/**
 * @author 朝花不迟暮
 * @version 1.0
 * @date 2021/2/4 23:17
 */
@TableName(value = "tree")
public class TreeNode
{
    @TableId
    private String id;
    private String parentId;
    private HashSet<TreeNode> children;

    public TreeNode(String id, String parentId)
    {
        this.id = id;
        this.parentId = parentId;
    }


    public String getParentId()
    {
        return parentId;
    }

    public void setParentId(String parentId)
    {
        this.parentId = parentId;
    }

    public String getId()
    {
        return id;
    }

    public void setId(String id)
    {
        this.id = id;
    }

    public HashSet<TreeNode> getChildren()
    {
        return children;
    }

    public void setChildren(HashSet<TreeNode> children)
    {
        this.children = children;
    }
}
